package com.ruoyi.project.asset.house.model.dto;

import java.math.BigDecimal;

import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.project.asset.assets.domain.Assets;
import com.ruoyi.project.asset.assets.model.dto.AssetsDTO;
import com.ruoyi.project.asset.house.domain.House;

import lombok.Data;

/**
 * 房屋
 * @author xianz
 *
 */
@Data
public class HouseDTO extends AssetsDTO{

	/**
	 * 
	 */
	private static final long serialVersionUID = -8162867688635642396L;

    /** 建筑面积 */
    @Excel(name = "建筑面积")
    private BigDecimal buildArea;
    
    /** 资产id */
    private String assetsId;
	
    
    
    /**
     * 资产转houseDTO
     * @param assets
     * @param house
     * @return
     */
    public static HouseDTO assetsToHouseDTO(Assets assets,House house) {
    	HouseDTO houseDTO = new HouseDTO();
    	BeanUtils.copyPropertiesFilterNull(assets, houseDTO, new String[] {});
    	houseDTO.setBuildArea(house.getBuildArea());
    	return houseDTO;
    }
    
}
